#ifndef __DBUTTON_H__
#define __DBUTTON_H__

#define  GPIO_BUTTON_PIN         GPIO_Pin_8
#define  GPIO_JOYSTICK_L_PIN     GPIO_Pin_3
#define  GPIO_JOYSTICK_R_PIN     GPIO_Pin_4
#define  GPIO_JOYSTICK_U_PIN     GPIO_Pin_5
#define  GPIO_JOYSTICK_D_PIN     GPIO_Pin_6

#define  GPIOx_BUTTON            GPIOA
#define  GPIOx_JOYSTICK          GPIOE
#define  GPIO_BUTTON_PERIPH      RCC_APB2Periph_GPIOA
//#define  ANTI_BOUNCING_COUNT     100
#define  ANTI_BOUNCING_COUNT     25         // YRT20090311
//#define  BUTTON_DIVIDER          10 /*!< Passes in BUTTON_Handler needed to enter it */
//#define  SHUTDOWNCOUNT           200

enum ButtonStateEnum
    {
    BUTTON_PUSHED = 0,
    BUTTON_PUSHING,
    BUTTON_PULLED,
    BUTTON_PULLING,
    };

enum ButtonIdEnum
    {
    BUTTON_MIDDLE = 0,
    BUTTON_UP,
    BUTTON_DOWN,
    BUTTON_RIGHT,
    BUTTON_LEFT,
    };

void BUTTON_Configuration( void );

#endif // __DBUTTON_H__